package com.itljm.cxrMarket.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author ljm
 * @date 2024/11/4 17:06
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysUser implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;
    private String username;
    private String password;
    private String name;
    private String phone;
    private String sex;
    private Integer age;
    private String address;
    private String email;
    private String avatar;
    private Integer enabled;
    private String delFlag;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
    private String openId;// 微信登录ID

    @TableField(exist = false)
    private Integer merchantId;// 关联商户ID

    @TableField(exist = false)
    private String phoneCode;
    @TableField(exist = false)
    private String chapter; // 验证码

    @TableField(exist = false)
    private Integer roleId;

    @TableField(exist = false)
    private List<SysRole> roles;
}
